package com.example.jstojava.slice;

import com.example.jstojava.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class DetailAbilitySlice extends AbilitySlice {
    public static final HiLogLabel LABEL = new HiLogLabel(0, 0, "DetailAbilitySlice");
    public static int count = 1;

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_detail);
        count++;
        HiLog.debug(LABEL, "OnStart Fire " + count);
    }

    @Override
    protected void onStop() {
        super.onStop();
        HiLog.debug(LABEL, "OnStop Fire");
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
        // Never Fire
        HiLog.debug(LABEL, "onForeground Fire");
    }

    @Override
    protected void onBackground() {
        super.onBackground();
        HiLog.debug(LABEL, "onBackground fire");
    }
}
